﻿HmJS.$Import('image.effect.Mosaic');
//HmJS.$Import('core.domready');

HmJS.register('demo.module.image.effect.mosaic', function ($ns) {
	var that = {};

	that.todo = function () {

		var mosaic = new $ns.image.effect.Mosaic({
			base: $('myDiv'),
			image: "megan.png",
			width: 483,
			height: 356,
			startColor: '#930',
			endColor: '#000',
			startAlpha: .7,
			endAlpha: .1,
			hacked: true

		});

		mosaic.setDuration(400);
		mosaic.setTransition(Fx.Transitions.Sine.easeOut);
		mosaic.render();

		$('uncover').addEvent('click', function () {
			mosaic.uncover();
		});

		$('cover').addEvent('click', function () {
			mosaic.cover();
		});

	};

	return that;
});
